/*根据类别获取图片工具*/

function getImageListData(typeName, start, len, callback) {

  var weApi;
  weApi = "https://pic.sogou.com/napi/pc/searchList?mode=1" + "&start=" + start + "&xml_len=" + len + "&query=手机壁纸高清"+typeName;

  //发送请求加载信息
  wx.request({
    url: weApi,
    success: function (res) {
      var hw = res.data;
      callback && callback(hw);
    }
  })
}

//https://pic.sogou.com/risapi/wap/result?query=http://5b0988e595225.cdn.sohucs.com/images/20180727/8d3dd8b248424a0bbae5fa5c2ae5479a.jpeg
function getIdentifyInfo(path,callback) {

  var weApi;
  weApi = `https://pic.sogou.com/risapi/wap/result?query=${path}`

  //发送请求加载信息
  wx.request({
    url: weApi,
    success: function (res) {
      var hw = res.data;
      callback && callback(hw);
    }
  })
}

//设置导出信息
module.exports = {
  getImageListData:getImageListData,
  getIdentifyInfo:getIdentifyInfo
};

